package com.example.demo.provider;


import com.example.api.DemoApi;
import com.example.domain.User;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoProvider implements DemoApi {
    @Override
    public String test(String test) {
        return "test: " + test;
    }

    @Override
    public User user(@RequestBody User user) {
        if (user == null) {
            user = new User(10, "Joab-Y");
        }
        return user;
    }
}
